<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('email')->default('')->comment('邮箱');
            $table->string('pass')->default('')->comment('密码');
            $table->string('name')->nullable()->comment('昵称');
            $table->string('status')->default('1')->comment('状态');
            $table->string('vip_id')->default('1')->comment('会员组');
            $table->dateTime('vip_expire')->nullable()->comment('会员到期');
            $table->decimal('balance')->default('0.00')->comment('余额');
            $table->integer('forward')->default('0')->comment('转发额度');
            $table->integer('dwz')->default('0')->comment('短网址额度');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user');
    }
}
